<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    request.setAttribute("path", path);
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>">
    <title>书城商品列表</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <link rel="stylesheet"  href="${pageContext.request.contextPath}/css/style.css">
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-2.1.0.js"></script>
</head>
<body>
<!-- start header -->
<header>
    <div class="top center">

        <div class="right fr">
            <div class="gouwuche fr"><a href="${pageContext.request.contextPath}/shop/showAllShop">购物车</a></div>
            <div class="fr">
                <ul>
                    <li><a href="${pageContext.request.contextPath}/rescoues/userlogin.jsp" target="_blank">登录</a></li>
                    <li>|</li>
                    <li><a href="${pageContext.request.contextPath}/page/dingdanzhongxin.jsp" target="_blank">我的订单</a></li>
                    <li>|</li>
                    <li><a href="${pageContext.request.contextPath}/page/self_info.jsp" target="_blank">个人中心</a></li>
<%--                    <li>|</li>--%>
<%--                    <li><a href="">消息通知</a></li>--%>
                </ul>
            </div>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div>
</header>
<!--end header -->

<!-- start banner_x -->
<div class="banner_x center">
    <a href="./index.html" target="_blank"><div class="logo fl"></div></a>
    <a href=""><div class="ad_top fl"></div></a>
    <div class="nav fl">
        <ul>
            <li><a href="${pageContext.request.contextPath}/page/liebiao.jsp">小说</a></li>
            <li><a href="${pageContext.request.contextPath}/page/liebiao.jsp">漫画</a></li>
            <li><a href="${pageContext.request.contextPath}/page/liebiao.jsp">工具书</a></li>
            <li><a href="${pageContext.request.contextPath}/page/liebiao.jsp">专业书</a></li>
            <li><a href="${pageContext.request.contextPath}/page/liebiao.jsp">儿童读物</a></li>
            <li><a href="${pageContext.request.contextPath}/page/liebiao.jsp">科幻</a></li>
            <li><a href="${pageContext.request.contextPath}/page/liebiao.jsp">美术</a></li>
            <li><a href="${pageContext.request.contextPath}/page/liebiao.jsp">其他</a></li>

        </ul>
    </div>
    <div class="search fr">
        <form action="" method="post">
            <div class="text fl">
                <input type="text" class="shuru"  placeholder="&nbsp;&nbsp;红楼梦">
            </div>
            <div class="submit fl">
                <input type="submit" class="sousuo" value="搜索"/>
            </div>
            <div class="clear"></div>
        </form>
        <div class="clear"></div>
    </div>
</div>
<!-- end banner_x -->

<!-- start banner_y -->
<!-- end banner -->

<!-- start danpin -->
<div class="danpin center">

    <div class="biaoti center">畅销书籍</div>

<%--        <button onclick="x()">111</button>--%>
    <div class="main center">
        <div>
            <c:forEach var="obj" items="${sessionScope.book}" varStatus="session">
                <div id="t1" class="mingxing fl mb20" style="border:2px solid #fff;width:230px;cursor:pointer;" onmouseout="this.style.border='2px solid #fff'" onmousemove="this.style.border='2px solid red'">
                    <div class="sub_mingxing"><a href="${pageContext.request.contextPath}/shop/showParticulars/${obj.bookname}" target="_blank"  ><img src="${obj.typename}" alt=""></a></div>
                    <div class="pinpai"><a target="_blank">${obj.bookname}</a></div>
                    <div class="youhui">${obj.remark}</div>
                    <div class="jiage">${obj.selling}元</div>
<%--                    <a style="padding-right: 1px;margin-left: 158px;" class="jiage" >查看详情</a>--%>

                </div>
            </c:forEach>
        </div>

        <div class="clear"></div>
    </div>
</div>

<%--<footer class="mt20 center" >
    <div class="mt20">小米书城|MIUI|米聊|多看书城|掌上阅读|视频电话|小米书店|书城淘宝直营店|小米网盟|小米移动|隐私政策|Select Region</div>
    <div>©mi.com 京ICP证110507号 京ICP备10046444号 京公网安备11010802020134号 京网文[2014]0059-0009号</div>
    <div>违法和不良信息举报电话：185-0130-1238，本网站所列数据，除特殊说明，所有数据均出自我司实验室测试</div>
</footer>--%>
</body>
<script type="text/javascript">
    function x() {
        //alert("122")
        $.ajax({
            type:'post'
            ,url:'${pageContext.request.contextPath}/book/showBook'
            ,dataType:'json'
            ,success:function (data) {
                //alert(data[0].typename);
            }
        })
    }

    x();
</script>
</html>
